import Vue from 'vue'
import FastClick from 'fastclick'
import router from './router'
import store from './store'
import App from './App'

router.beforeEach(function (to, from, next) {
    store.commit('UPDATE_LOADING_STATUS', {isLoading: true})
    next()
})

router.afterEach(function (to) {
    store.commit('UPDATE_LOADING_STATUS', {isLoading: false})
})

FastClick.attach(document.body)

Vue.config.productionTip = false
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app-box')
